package com.ehotting.edsta.circuitDesign.bean;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

// 打包方案数据
public class SchemePackageBean {

    private List<SchemeBean> schemeList = new ArrayList<>();

    private Double priceMax = 0.0;
    private Double priceMin = 0.0;

    private Double areaMax = 0.0;
    private Double areaMin = 0.0;

    private Double powerMax = 0.0;
    private Double powerMin = 0.0;

    private Double timeMax = 0.0;
    private Double timeMin = 0.0;

    private Set<String> typeC; // 存储器类型
    private Set<String> modeC; // 处理器型号

    public SchemePackageBean() {
    }

    public SchemePackageBean(List<SchemeBean> schemeList) {
        this.schemeList = schemeList;
        for(SchemeBean scheme : schemeList){
            if(scheme.getPrice()!=null  && priceMax < scheme.getPrice()){
                priceMax = scheme.getPrice();
            }
            if(scheme.getPrice()!=null && priceMin > scheme.getPrice()){
                priceMin = scheme.getPrice();
            }
            if(scheme.getArea()!=null && areaMax < scheme.getArea()){
                areaMax = scheme.getArea();
            }
            if(scheme.getArea() != null && areaMin > scheme.getArea()){
                areaMin = scheme.getArea();
            }
            if(scheme.getPower()!=null && powerMax < scheme.getPower()){
                powerMax = scheme.getPower();
            }
            if(scheme.getPower() != null && powerMin > scheme.getPower()){
                powerMin = scheme.getPower();
            }
            if(scheme.getTime()!=null && timeMax < scheme.getTime()){
                timeMax = scheme.getTime();
            }
            if(scheme.getTime() != null && timeMin > scheme.getTime()){
                timeMin = scheme.getTime();
            }
            if (scheme.getModeC() != null && scheme.getModeC().size() > 0){
                modeC.addAll(scheme.getModeC());
            }
            if (scheme.getTypeC() != null && scheme.getTypeC().size() > 0){
                typeC.addAll(scheme.getTypeC());
            }

        }
    }

    public List<SchemeBean> getSchemeList() {
        return schemeList;
    }

    public void setSchemeList(List<SchemeBean> schemeList) {
        this.schemeList = schemeList;
    }

    public Double getPriceMax() {
        return priceMax;
    }

    public void setPriceMax(Double priceMax) {
        this.priceMax = priceMax;
    }

    public Double getPriceMin() {
        return priceMin;
    }

    public void setPriceMin(Double priceMin) {
        this.priceMin = priceMin;
    }

    public Double getAreaMax() {
        return areaMax;
    }

    public void setAreaMax(Double areaMax) {
        this.areaMax = areaMax;
    }

    public Double getAreaMin() {
        return areaMin;
    }

    public void setAreaMin(Double areaMin) {
        this.areaMin = areaMin;
    }

    public Double getPowerMax() {
        return powerMax;
    }

    public void setPowerMax(Double powerMax) {
        this.powerMax = powerMax;
    }

    public Double getPowerMin() {
        return powerMin;
    }

    public void setPowerMin(Double powerMin) {
        this.powerMin = powerMin;
    }

    public Double getTimeMax() {
        return timeMax;
    }

    public void setTimeMax(Double timeMax) {
        this.timeMax = timeMax;
    }

    public Double getTimeMin() {
        return timeMin;
    }

    public void setTimeMin(Double timeMin) {
        this.timeMin = timeMin;
    }

    public Set<String> getTypeC() {
        return typeC;
    }

    public void setTypeC(Set<String> typeC) {
        this.typeC = typeC;
    }

    public Set<String> getModeC() {
        return modeC;
    }

    public void setModeC(Set<String> modeC) {
        this.modeC = modeC;
    }
}
